<!DOCTYPE html>
<html>
<head>
	<title>Angular Includes</title>
	<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
	<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
	<h2>AngularJS Sample Application</h2>
	<div ng-app="mainApp" ng-controller="studentController">
		<div ng-include="'main.html'"></div>
		<div ng-include="'subject.html'"></div>
	</div>
	<script>
		var mainApp = angular.module('mainApp', []);
		mainApp.controller('studentController', function($scope) {
			$scope.student = {
				firstName: 'Henry',
				lastName: 'Liu',
				fees: 500,

				subjects: [
					{ name: 'Physics', marks: 70 },
					{ name: 'Chemistry', marks: 80 },
					{ name: 'Math', marks: 65 },
                    { name: 'English', marks: 75 },
                    { name: 'Hindi', marks: 67 }
				],

				fullName: function() {
					var studentObj ;
					studentObj = $scope.student;
					return studentObj.firstName + " " + studentObj.lastName;
				}
			}
		});
	</script>
</body>
</html>